#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>

#include <cstdlib>
#include <iostream>
#include <sstream>

#include "server.h"
#include "socket.h"
#include "master.h"
#include "client_server.pb.h"
#include "load.pb.h"

using namespace std;

int main(int argc, const char** argv) {
	GOOGLE_PROTOBUF_MIN_PROTOC_VERSION;;
  // Start the client and listen on port

  char host[255];
  unsigned short port = 9999;

  gethostname(host, 255);

  hostent* record = gethostbyname(host);
  in_addr* address=(in_addr * )record->h_addr;

  Master * master = new Master(inet_ntoa(*address), port);
  master->start();

}
